<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.org/ui"
      xmlns:h="http://java.sun.com/jsf/html">
    <h:head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
        <link rel="shortcut icon" href="images/logo W.jpg" />
        <title>Work to Worker</title>
        <style>
            a:link {text-decoration:none;} 
        </style>
        <style type="text/css">
            @font-face {
                font-family: "jokerman";
                src: url('font/VIVALDII.TTF') format("truetype");
            }   
            @media screen and (-webkit-min-device-pixel-ratio:0)
            {
                #fix1 { margin-top: 0px }
                #pass{margin-top: 28px}
                #confirm{margin-top: 25px}
                #detail{margin-top: 16px}
                #phone{margin-top: 20px}
            }
            @-moz-document url-prefix()
            {
                #fix1 { margin-top: -20px }
            #pass{margin-top: 22px}
            #detail{margin-top: 20px}
            #confirm{margin-top: 19px}
            #phone{margin-top: 16px}
            }
        </style>
    </h:head>
    <h:body style="background-color:  #1A3665">
        <f:view locale="#{languageBean.locale}">            
            <div style="width: 1000px;margin: auto;margin-top: 20px;background-color: white;border-radius: 10px;-moz-border-radius: 10px">
                <ui:include src="headertemplate1.xhtml" />
                <hr style="width: 500px;margin-top: 30px" align="center"/>
                <div>                
                    <div style="background-color: #00C2F3;color: white;font-size: 20px;font-weight: bold;padding-left: 80px;margin-top: 40px">
                        Your Infomation
                    </div>
                    <h:form id="form1">
                        <div>
                            <ul style="margin-left: 50px;margin-top: 20px" >
                                <li style="display: inline-block;vertical-align: top;text-align: right;width: 280px;font-weight: bold;" >
                                    <ul id="username">
                                        <li style="list-style: none;">User name :</li>

                                    </ul>
                                    <ul style="margin-top: 18px">
                                        <li style="list-style: none;">Old password :</li>

                                    </ul>
                                    <ul style="margin-top: 22px">
                                        <li style="list-style: none;">New password : </li>

                                    </ul>
                                    <ul style="margin-top: 22px">
                                        <li style="list-style: none;">Confirm new password : </li>

                                    </ul>
                                </li>
                                <li style="display: inline-block;vertical-align: top;margin-top: 0px" >
                                    <ul style="margin-left: -13px"> 
                                        <li style="list-style: none;"><h:outputText value="#{customerEditInfo.acc.useName}"/></li>
                                    </ul>
                                    <ul id="detail" style="margin-left: -15px">
                                        <li style="display: inline;" ><h:inputSecret value="#{customerEditInfo.old_pass_temp}" id="pass" required="true" requiredMessage="* Password is required"/></li>
                                        <li style="display: inline"><h:message for="pass" style="color: red"/></li>  
                                    </ul>
                                    <ul id="detail" style="margin-left: -15px">
                                        <li style="display: inline;" id="detail">
                                            <h:inputSecret value="#{customerEditInfo.new_pass_temp}" id="newpass" required="true" requiredMessage="* New password is required">
                                                <f:validator validatorId="passwordValidator" />
                                                <f:attribute name="confirmPassword" value="#{confirmPassword}" />
                                            </h:inputSecret>
                                        </li>
                                        <li style="display: inline"><h:message for="newpass" style="color: red"/></li> 
                                    </ul>    
                                    <ul id="detail" style="margin-left: -15px">
                                        <li style="display: inline;" id="detail"><h:inputSecret id="confirmPassword" value="#{customerEditInfo.confirm_new_pass_temp}" required="true" requiredMessage="* Confirm new password is required" binding="#{confirmPassword}"/></li>
                                        <li style="display: inline"><h:message for="confirmPassword" style="color: red"/></li>
                                    </ul>
                                </li>                           
                            </ul>
                            <ul style="margin-top: 20px;margin-left: 80px">
                                <li style="display: inline;margin-left: 150px"><h:commandButton  value="Back" action="#{customerEditInfo.backToProfile()}" style="border-style: none;font-weight: bold;background-color: #1A3665;color: white;height: 30px;width:100px;cursor: pointer" immediate="true"/></li>
                                <li style="display: inline;margin-left: 30px"><h:commandButton value="Submit" action="#{customerEditInfo.editAccountInfo()}" style="border-style: none;font-weight: bold;background-color: #1A3665;color: white;height: 30px;width:100px;cursor: pointer" /></li>
                            </ul>
                        </div>
                    </h:form>
                    <hr style="width: 500px;margin-top: 30px" align="center"/>
                    <h:form>
                        <div style="margin-left: 80px;margin-top: 20px">
                            <ul>
                                <li style="display: inline-block;vertical-align: top;text-align: right;width: 250px;font-weight: bold;">
                                    <ul>
                                        <li style="list-style: none;">Business name :<font style="color: red"> *</font></li>                                    
                                        <li style="list-style: none;" id="confirm">Address :<font style="color: red"> *</font></li>
                                        <li style="list-style: none;" id="phone">Phone :<font style="color: red"> *</font></li>
                                        <li style="list-style: none;" id="phone">Description of your business :<font style="color: red"> *</font></li>
                                    </ul>
                                </li>
                                <li style="display: inline-block;vertical-align: top;margin-left: -15px">
                                    <ul>
                                        <li style="display: inline"><h:inputText value="#{customerEditInfo.cus.name}" id="cusname" required="true" requiredMessage="* Business name is required"/> </li>   
                                        <li style="display: inline"><h:message for="cusname" style="color: red"/></li>
                                    </ul>
                                    <ul style="margin-top: 18px">
                                        <li style="display: inline"><h:inputText value="#{customerEditInfo.cus.address}" id="cusaddress" required="true" requiredMessage="* Address is required"/></li>
                                        <li style="display: inline"><h:message for="cusaddress" style="color: red"/></li>
                                    </ul>
                                    <ul style="margin-top: 15px">
                                        <li style="display: inline">
                                            <h:inputText value="#{customerEditInfo.cus.phone}" id="cusphone" required="true" requiredMessage="* Phone is required" validatorMessage="* Phone is not valid">
                                                <f:validateRegex pattern="^09[0-9]{8}||^01[0-9]{9}"  />
                                            </h:inputText> 
                                        </li>
                                        <li style="display: inline"><h:message for="cusphone" style="color: red"/></li>
                                    </ul>
                                    <ul style="margin-top: 20px">
                                        <li style="display: inline;"><p:editor value="#{customerEditInfo.cus.description}" id="cusdes" required="true" requiredMessage="* Description is required"/> </li>
                                        <li style="display: inline"><h:message for="cusdes" style="color: red"/></li>
                                    </ul>
                                </li>
                            </ul>
                            <ul style="margin-top: 20px">
                                <li style="display: inline;margin-left: 150px"><h:commandButton  value="Back" action="#{customerEditInfo.backToProfile()}" style="border-style: none;font-weight: bold;background-color: #1A3665;color: white;height: 30px;width:100px;cursor: pointer" immediate="true"/></li>
                                <li style="display: inline;margin-left: 30px"><h:commandButton action="#{customerEditInfo.editCustomerInfo()}" value="Submit" style="border-style: none;font-weight: bold;background-color: #1A3665;color: white;height: 30px;width:100px;cursor: pointer" /></li>
                            </ul>
                        </div>
                    </h:form>
                </div>
                <br/>
                <br/>
            </div>
            <div style="color: white; height: 100px;border-radius: 10px;-moz-border-radius: 10px;border: 1px;border-style: solid;border-color: white;margin-top: 20px">
                <div style="text-align: right; padding-top: 20px;padding-right: 30px">
                    Copyright © by Group 1
                    <br />
                    Project Name : Work to Worker
                    <br />
                    Member in Group : Mr Bùi Hồng Hải , Mr Nguyễn Văn Cường , Mr Nguyễn Nhất Linh , Mr Lưu Thế Thông , Mr Trần Trung Hiếu
                </div>
            </div>
        </f:view>
    </h:body>
</html>

